package com.ruoyi.coal.modules.minio;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class MinioProperties {
    @Value("${minio.endpoint}")
    private String endpoint;

    @Value("${minio.accesskey}")
    private String accessKey;

    @Value("${minio.secretkey}")
    private String secretKey;

    @Value("${minio.bucketname}")
    private String bucketname;

    @Value("${minio.filederName}")
    private String filename;

    public void setEndpoint(String endpoint) {
        this.endpoint = endpoint;
    }

    public void setAccessKey(String accessKey) {
        this.accessKey = accessKey;
    }

    public void setSecretKey(String secretKey) {
        this.secretKey = secretKey;
    }

    public void setBucketname(String bucketname) {
        this.bucketname = bucketname;
    }

    public void setFilename(String filename) {
        this.filename = filename;
    }

    public boolean equals(Object o) {
        if (o == this)
            return true;
        if (!(o instanceof com.ruoyi.coal.modules.minio.MinioProperties))
            return false;
        com.ruoyi.coal.modules.minio.MinioProperties other = (com.ruoyi.coal.modules.minio.MinioProperties)o;
        if (!other.canEqual(this))
            return false;
        Object this$endpoint = getEndpoint(), other$endpoint = other.getEndpoint();
        if ((this$endpoint == null) ? (other$endpoint != null) : !this$endpoint.equals(other$endpoint))
            return false;
        Object this$accessKey = getAccessKey(), other$accessKey = other.getAccessKey();
        if ((this$accessKey == null) ? (other$accessKey != null) : !this$accessKey.equals(other$accessKey))
            return false;
        Object this$secretKey = getSecretKey(), other$secretKey = other.getSecretKey();
        if ((this$secretKey == null) ? (other$secretKey != null) : !this$secretKey.equals(other$secretKey))
            return false;
        Object this$bucketname = getBucketname(), other$bucketname = other.getBucketname();
        if ((this$bucketname == null) ? (other$bucketname != null) : !this$bucketname.equals(other$bucketname))
            return false;
        Object this$filename = getFilename(), other$filename = other.getFilename();
        return !((this$filename == null) ? (other$filename != null) : !this$filename.equals(other$filename));
    }

    protected boolean canEqual(Object other) {
        return other instanceof com.ruoyi.coal.modules.minio.MinioProperties;
    }

    public int hashCode() {
        int PRIME = 59;
        int result = 1;
        Object $endpoint = getEndpoint();
        result = result * 59 + (($endpoint == null) ? 43 : $endpoint.hashCode());
        Object $accessKey = getAccessKey();
        result = result * 59 + (($accessKey == null) ? 43 : $accessKey.hashCode());
        Object $secretKey = getSecretKey();
        result = result * 59 + (($secretKey == null) ? 43 : $secretKey.hashCode());
        Object $bucketname = getBucketname();
        result = result * 59 + (($bucketname == null) ? 43 : $bucketname.hashCode());
        Object $filename = getFilename();
        return result * 59 + (($filename == null) ? 43 : $filename.hashCode());
    }

    public String toString() {
        return "MinioProperties(endpoint=" + getEndpoint() + ", accessKey=" + getAccessKey() + ", secretKey=" + getSecretKey() + ", bucketname=" + getBucketname() + ", filename=" + getFilename() + ")";
    }

    public String getEndpoint() {
        return this.endpoint;
    }

    public String getAccessKey() {
        return this.accessKey;
    }

    public String getSecretKey() {
        return this.secretKey;
    }

    public String getBucketname() {
        return this.bucketname;
    }

    public String getFilename() {
        return this.filename;
    }
}
